﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using FancyBattles.GameAudio;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Content;

namespace FancyBattles.GameScreen
{
    class CreditsScreen : GameScreen
    {
        #region Atributes

        public static Texture2D creditsBG;
        Texture2D credits;

        #endregion

        #region Properties
        #endregion

        #region Creators
        #endregion

        #region Methods

        public override void LoadContent()
        {
            base.LoadContent();

            //AudioManager.PlayMusicLoop("explosion");

            creditsBG = ContentManager.Load<Texture2D>("Screens/BACKGROUND");
            credits = ContentManager.Load<Texture2D>("Screens/CREDITS");
        }

        public override void UnloadContent()
        {
            base.UnloadContent();
        }

        public override UpdateResponse Update(GameTime gameTime)
        {
            UpdateResponse updateAnswer = UpdateResponse.ERROR;
            if (InputHandler.isConfirm(PlayerIndex.One))
            {
                updateAnswer = UpdateResponse.CLOSE_SCREEN;
            }
            return updateAnswer;
        }

        public override void Draw(GameTime gameTime)
        {
            Rectangle fullscreen = new Rectangle(0, 0, 1280, 760);

            SpriteBatch.Begin();

            SpriteBatch.Draw(creditsBG, fullscreen, Color.White);
            SpriteBatch.Draw(credits, fullscreen, Color.White);

            SpriteBatch.End();
            base.Draw(gameTime);
        }

        #endregion
    }
}
